$a = "abc";
$b = "xyz";

print "Value of \$a = $a and value of \$b = $b\n";

if( $a lt $b ){						#逐位比较左操作数小于右操作数
   print "$a lt \$b is true\n";
}else{
   print "\$a lt \$b is not true\n";
}

if( $a gt $b ){						#逐位比较左操作数大于右操作数
   print "\$a gt \$b is true\n";
}else{
   print "\$a gt \$b is not true\n";
}

if( $a le $b ){						#逐位比较左操作数小于等于右操作数
   print "\$a le \$b is true\n";
}else{
   print "\$a le \$b is not true\n";
}

if( $a ge $b ){						#逐位比较左操作数大于等于右操作数
   print "\$a ge \$b is true\n";
}else{
   print "\$a ge \$b is not true\n";
}

if( $a ne $b ){						#逐位比较左操作数不等于右操作数
   print "\$a ne \$b is true\n";
}else{
   print "\$a ne \$b is not true\n";
}

$c = $a cmp $b;						#逐位比较左操作数和右操作数，左比右小则-1 相等则0 大于则 1
print "\$a cmp \$b returns $c\n";